/*
 * @Description:
 * @FilePath: \rs_wms_pc\src\api\invoice\refund.js
 */
import request from '@/utils/request'

// 查询退料单列表
export function listRefund(query) {
  return request({
    url: '/bill/refund/list',
    method: 'get',
    params: query
  })
}

// 查询退料单详细
export function getRefund(id) {
  return request({
    url: '/bill/refund/' + id,
    method: 'get'
  })
}

// 新增退料单
export function addRefund(data) {
  return request({
    url: '/bill/refund',
    method: 'post',
    data: data
  })
}

// 修改退料单
export function updateRefund(data) {
  return request({
    url: '/bill/refund',
    method: 'put',
    data: data
  })
}

// 删除退料单
export function delRefund(id) {
  return request({
    url: '/bill/refund/' + id,
    method: 'delete'
  })
}

// 取消退料单
export function cancelRefund(data) {
  return request({
    url: '/bill/refund/cancel',
    method: 'put',
    data: data
  })
}

// 确认取消退料单
export function confirmCancelRefund(data) {
  return request({
    url: '/bill/refund/confirmCancel',
    method: 'put',
    data: data
  })
}

// 查询退料单明细列表
export function listRefundDetail(query) {
  return request({
    url: '/bill/refundDetail/list',
    method: 'get',
    params: query
  })
}

// 查询退料单明细详细
export function getRefundDetail(id) {
  return request({
    url: '/bill/refundDetail/' + id,
    method: 'get'
  })
}

// 新增退料单明细
export function addRefundDetail(data) {
  return request({
    url: '/bill/refundDetail',
    method: 'post',
    data: data
  })
}

// 修改退料单明细
export function updateRefundDetail(data) {
  return request({
    url: '/bill/refundDetail',
    method: 'put',
    data: data
  })
}

// 删除退料单明细
export function delRefundDetail(id) {
  return request({
    url: '/bill/refundDetail/' + id,
    method: 'delete'
  })
}

